/*    */ package com.qmsk.business.member.bind.controller;
/*    */ 
/*    */ import com.qmsk.business.megSend.MsgSendManage;
/*    */ import com.utils.basic.CRandomUtils;
/*    */ import com.utils.web.RequestUtils;
/*    */ import com.utils.web.ResponseUtils;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.commons.lang.StringUtils;
/*    */ import org.apache.log4j.Logger;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"bind"})
/*    */ public class BindController
/*    */ {
/* 26 */   private static final Logger logger = Logger.getLogger(BindController.class);
/*    */ 
/*    */   @RequestMapping(value={"send/user"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getListAll(HttpServletRequest request, HttpServletResponse response)
/*    */   {
/*    */     try
/*    */     {
/* 35 */       String mp = RequestUtils.getString(request, "mp");
/* 36 */       StringBuffer msg = new StringBuffer();
/* 37 */       String vcore = CRandomUtils.getNumberCode(4);
/* 38 */       String name = "E卡通";
/* 39 */       if (StringUtils.isNotEmpty(vcore)) {
/* 40 */         msg.append("您的短信验证码是:");
/* 41 */         msg.append(vcore);
/* 42 */         msg.append(",请您在20分钟内验证.谢谢您关注");
/* 43 */         msg.append(name);
/* 44 */         msg.append("。");
/* 45 */         if (MsgSendManage.sendSMS(mp, msg.toString())) {
/* 46 */           ResponseUtils.setResponseResult(vcore, response);
/* 47 */           return;
/*    */         }
/*    */       }
/* 50 */       ResponseUtils.setErrorMsgResponse((String)MsgSendManage.account.get("sms_error"), response);
/*    */     } catch (Exception e) {
/* 52 */       logger.error(e);
/* 53 */       ResponseUtils.setErrorMsgResponse((String)MsgSendManage.account.get("sms_error"), response);
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.member.bind.controller.BindController
 * JD-Core Version:    0.5.3
 */